<template>
    <div class="swiper-container" :class="name">
        <div class="swiper-wrapper">
            <slot></slot>
        </div>
    </div>
</template>
<script>
import Swiper from 'swiper/bundle'
import 'swiper/swiper-bundle.css'
export default {
  props: {
    slidesPerView: {
      type: Number,
      default: 3
    },
    name: {
      type: String,
      default: 'kerwin'
    }
  },
  mounted () {
    new Swiper('.' + this.name, {
      // direction: 'vertical', // 垂直切换选项
      slidesPerView: this.slidesPerView,
      spaceBetween: 50,
      freeMode: true
    })
  }
}
</script>
